package com.baizhi.controller;

import com.baizhi.entity.CmfzResource;
import com.baizhi.service.CmfzRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("role")
public class CmfzRoleController {
    @Autowired
    private CmfzRoleService cmfzRoleService;

    @RequestMapping("selectRoleData")
    public Map selectRoleData(Integer page, Integer limit){
        return cmfzRoleService.selectRoleByPage(page,limit);
    }

    @RequestMapping("selectAllResource")
    public List<CmfzResource> selectAllResource(){
        return cmfzRoleService.selectAllResource();
    }
}
